﻿using System;
using System.Collections.Generic;
using System.Text;

namespace NLBS.Views
{
    public partial class PostArticlePresenter
    {
        #region event
        /// <summary>
        /// 当日志添加前触发的事件
        /// </summary>
        public static event EventHandler<ArticleInsertEventArgs> Inserting;
        /// <summary>
        /// 当日志添加后触发的事件
        /// </summary>
        public static event EventHandler<ArticleInsertEventArgs> Inserted;
        /// <summary>
        /// 当日志删除前触发的事件
        /// </summary>
        public static event EventHandler<ArticleDeleteEventArgs> Deleteing;
        /// <summary>
        /// 当日志删除后触发的事件
        /// </summary>
        public static event EventHandler<ArticleDeleteEventArgs> Deleted;
        /// <summary>
        /// 当日志更新前触发的事件
        /// </summary>
        public static event EventHandler<ArticleUpdateEventArgs> Updateing;
        /// <summary>
        /// 当日志更新后触发的事件
        /// </summary>
        public static event EventHandler<ArticleUpdateEventArgs> Updated;
        /// <summary>
        /// 当日志选中前触发的事件
        /// </summary>
        public static event EventHandler<ArticleSelectEventArgs> Selecting;
        /// <summary>
        /// 当日志选中后触发的事件
        /// </summary>
        public static event EventHandler<ArticleSelectEventArgs> Selected;
        /// <summary>
        /// 引发Selecting事件
        /// </summary>
        /// <param name="e">日志选中前包含事件的参数</param>
        protected virtual void OnSelecting(ArticleSelectEventArgs e)
        {
            if (Selecting != null)
            {
                Selecting(this, e);
            }
        }
        /// <summary>
        /// 引发Selected事件
        /// </summary>
        /// <param name="e">日志选中后包含事件的参数</param>
        protected virtual void OnSelected(ArticleSelectEventArgs e)
        {
            if (Selected != null)
            {
                Selected(this, e);
            }
        }
        /// <summary>
        /// 引发Deleteing事件
        /// </summary>
        /// <param name="e">日志删除前包含事件的参数</param>
        protected virtual void OnDeleteing(ArticleDeleteEventArgs e)
        {
            if (Deleteing != null)
            {
                Deleteing(this, e);
            }
        }
        /// <summary>
        /// 引发Deleted事件
        /// </summary>
        /// <param name="e">日志删除后包含事件的参数</param>
        protected virtual void OnDeleted(ArticleDeleteEventArgs e)
        {
            if (Deleted != null)
            {
                Deleted(this, e);
            }
        }
        /// <summary>
        /// 引发Updateing事件
        /// </summary>
        /// <param name="e">日志更新前包含事件的参数</param>
        protected virtual void OnUpdateing(ArticleUpdateEventArgs e)
        {
            if (Updateing != null)
            {
                Updateing(this, e);
            }
        }
        /// <summary>
        /// 引发Updated事件
        /// </summary>
        /// <param name="e">日志更新后包含事件的参数</param>
        protected virtual void OnUpdated(ArticleUpdateEventArgs e)
        {
            if (Updated != null)
            {
                Updated(this, e);
            }
        }
        /// <summary>
        /// 引发Inserting事件
        /// </summary>
        /// <param name="e">日志添加插入前包含事件的参数</param>
        protected virtual void OnInserting(ArticleInsertEventArgs e)
        {
            if (Inserting != null)
            {
                Inserting(this, e);
            }
        }
        /// <summary>
        /// 引发Inserted事件
        /// </summary>
        /// <param name="e">日志添加插入后包含事件的参数</param>
        protected virtual void OnInserted(ArticleInsertEventArgs e)
        {
            if (Inserting != null)
            {
                Inserted(this, e);
            }
        }

        #endregion
    }
}
